package com.objetdirect.gwt.umldrawer.client;

import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

public class SamplesPage implements PageContent {

	private VerticalPanel mainPanel = new VerticalPanel();
	private VerticalPanel samplesContent = new VerticalPanel();
	private HorizontalPanel samplesWithImage = new HorizontalPanel();
	private VerticalPanel samplesPanel = new VerticalPanel();
	private Image umlImage = new Image();
	private Label samplesLabel = new Label();
	private Image header = new Image();
	private Image footer = new Image();
	private Label classDiagramLabel = new Label();
	private Image classDiagramImage1 = new Image();
	private Image classDiagramImage2 = new Image();
	private Label objectDiagramLabel = new Label();
	private Image objectDiagramImage1 = new Image();
	private Image objectDiagramImage2 = new Image();
	private Label sequenceDiagramLabel = new Label();
	private Image sequenceDiagramImage1 = new Image();
	private Image sequenceDiagramImage2 = new Image();
	
	@Override
	public void setPageContent() {
		
		header.setUrl("images/header.png");
		header.setWidth("1201px");
		header.setStyleName("headerImage");
		
		classDiagramLabel.setText("Class Diagram Samples");
		classDiagramLabel.setStyleName("samplesLabels");
		
		classDiagramImage1.setUrl("samples/classDiagram1.jpg");
		classDiagramImage1.setStyleName("samplesImages");
		
		classDiagramImage2.setUrl("samples/classDiagram2.jpg");
		classDiagramImage2.setStyleName("samplesImages");
		
		objectDiagramLabel.setText("Object Diagram Samples");
		objectDiagramLabel.setStyleName("samplesLabels");
		
		objectDiagramImage1.setUrl("samples/objectDiagram1.jpg");
		objectDiagramImage1.setStyleName("samplesImages");
		
		objectDiagramImage2.setUrl("samples/objectDiagram2.jpg");
		objectDiagramImage2.setStyleName("samplesImages");
		
		sequenceDiagramLabel.setText("Sequence Diagram Samples");
		sequenceDiagramLabel.setStyleName("samplesLabels");
		
		sequenceDiagramImage1.setUrl("samples/sequenceDiagram1.jpg");
		sequenceDiagramImage1.setStyleName("samplesImages");
		
		sequenceDiagramImage2.setUrl("samples/sequenceDiagram2.jpg");
		sequenceDiagramImage2.setStyleName("samplesImages");
		
		samplesLabel.setText("Samples");
		samplesLabel.setStyleName("pagesHeader");
		
		samplesContent.add(new HeaderButtons().getHeaderButtons());
		samplesContent.add(samplesLabel);
		samplesContent.add(classDiagramLabel);
		samplesContent.add(classDiagramImage1);
		samplesContent.add(classDiagramImage2);
		samplesContent.add(objectDiagramLabel);
		samplesContent.add(objectDiagramImage1);
		samplesContent.add(objectDiagramImage2);
		samplesContent.add(sequenceDiagramLabel);
		samplesContent.add(sequenceDiagramImage1);
		samplesContent.add(sequenceDiagramImage2);
		
		footer.setUrl("images/footer.png");
		footer.setWidth("1200px");
		
		umlImage.setUrl("images/image2.jpg");
		umlImage.setStyleName("homeLeftImage");
		
		samplesWithImage.add(umlImage);
		samplesWithImage.add(samplesContent);
		
		samplesPanel.add(samplesWithImage);
		samplesPanel.add(new PrivacyBar().getprivacyBar());
		samplesPanel.setStyleName("border");
		
		mainPanel.add(header);
		mainPanel.add(samplesPanel);
		mainPanel.add(footer);
	}

	@Override
	public VerticalPanel getPageContent() {
		setPageContent();
		return mainPanel;
	}

}
